import request from "@/utils/request";

/**
 * @description 获取配置信息
 * @param params
 * @returns
 */
export const getSettingInfoApi: IGetSettingInfoApi = (str) => {
  return request.get(`htscrm/site_system_config/info/${str}`, { });
}
/**
 * @description 保存配置信息
 * @param params
 * @returns
 */
export const saveSettingInfoApi: ISaveSettingInfoApi = (str, data) => {
  return request.post(`htscrm/site_system_config/save/${str}`, data);
}

/**
 * @description 获取配置信息
 * @param params
 * @returns
 */
export const getWechatConfigApi: IGetWechatConfigApi = () => {
  return request.get(`htscrm/work/info`, { });
}
/**
 * @description 保存配置信息
 * @param params
 * @returns
 */
export const saveWechatConfigApi: ISaveWechatConfigApi = (data) => {
  return request.post(`htscrm/work/save`, data);
}

/**
 * @description 获取公众号列表
 * @param params
 * @returns
 */
export const getWechatOfficialListApi: IGetExportListApi = (params) => {
  return request.get(`htscrm/wechat_official/list`, {params});
}

/**
 * @description 添加公众号列表
 * @param params
 * @returns`
 */
export const getWechatOfficialAddApi: IGetExportListApi = (data) => {
  return request.post(`htscrm/wechat_official/add`, data);
}

/**
 * @description 编辑公众号列表
 * @param params
 * @returns
 */
export const getWechatOfficialEditApi: IGetExportListApi = (data) => {
  return request.post(`htscrm/wechat_official/edit`, data);
}

/**
 * @description 删除公众号列表
 * @param params
 * @returns
 */
export const getWechatOfficialDelApi: IGetExportListApi = (data) => {
  return request.post(`htscrm/wechat_official/del`, data);
}